<admintpl file="header" />
<style type="text/css">
.print {border: 2px solid #c3c3c3;
    box-shadow: 6px 7px 12px #c3c3c3;
padding: 0;
margin: 0;
width: 220px;margin:0 auto;

}
</style>

<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('AdminCard/add',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">卡片充值</a></li>
			<li class="active"><a href="javascript:;" target="_self">充值账单</a></li>
		</ul>
		<div class="row-fluid">
			<div class="print" id="print">
				<style>
				/*****************
				小票
				*****************/
				.print_title {text-align: center;width: 100%;font-size: 18px;border-bottom: 1px groove;padding-bottom: 12px;margin-bottom: 12px;}
				.print_area{font-size:12px;padding: 20px 40px 20px 10px;}
				.print_row {margin-bottom: 12px;}
				.print_row .left{display: inline-block;font-size: 12px;line-height: 12px;}
				.spliter{border-top: 1px dashed;}
				.print_footer{padding-bottom: 24px;border-bottom: 1px groove;}
				</style>
				<div class="print_area">
					<div class="print_title">充值记录单</div>
					<div class="print_content">
						<div class="print_row">
							<span class="left">流水号：{$recharge_data.number}</span>
						</div>
						<div class="print_row">
							<span class="left">操作时间：{:date("Y-m-d H:i:s",$recharge_data['create_time'])}</span>
						</div>
						<div class="print_row">
							<span class="left">账单名目：卡片充值</span>
						</div>
						<div class="print_row">
							<span class="left">充值金额：{$recharge_data.price}</span>
						</div>
						<div class="print_row">
							<span class="left">赠送金额：{$recharge_data.self_price}</span>
						</div>
						<div class="print_row">
							<span class="left">充值卡号：{$card_data.number}</span>
						</div>
						<div class="print_row">
							<span class="left">卡内余额：{$card_data.balance}</span>
						</div>
						<div class="print_row">
							<span class="left">卡内积分：{$card_data.point}</span>
						</div>
						<if condition="$card_data['vip_name']">
						<div class="print_row">
							<span class="left">持卡会员：{$card_data.vip_name}</span>
						</div>
						</if>
						<if condition="$card_data['vip_phone']">
						<div class="print_row">
							<span class="left">会员手机：{$card_data.vip_phone}</span>
						</div>
						</if>
						<if condition="$card_data['vip_plate_number']">
						<div class="print_row">
							<span class="left">会员车牌：{$card_data.vip_plate_number}</span>
						</div>
						</if>
						<div class="print_row">
							<if condition="$card_data['lid'] == 1">
							<span class="left">充值机构：{$sale.sale_name}</span>
							<else/>
							<span class="left">充值机构：{$logistics.logistics_name}</span>
							</if>
						</div>
						<div class="print_row">
							<span class="left">操作员：{$logistics_user.user_nicename}</span>
						</div>
						<div class="print_row">
							<span class="left">{$recharge_data.desc}</span>
						</div>
						<div class="spliter"></div>
					</div>
					<div class="print_footer">
						<div>一号物流油气卡平台</div>	
						<div>感谢您的使用！</div>
					</div>
				</div>
			</div>

			<div class="form-actions">
				<p class="print_download" style="display:none">请下载打印插件 <a href="__PUBLIC__/install/CLodop_Setup_for_Win32NT.exe">CLodop_Setup_for_Win32NT.exe</a></p>
				<!-- <a href="javascript:prn1_preview()">打印预览</a> -->
				<a class="btn btn-primary js-ajax-submit"  href="javascript:prn1_printA()">选择打印机</a>
				<a class="btn btn-primary js-ajax-submit" href="javascript:prn1_preview()">打印小票</a>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jQuery.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/lodop/LodopFuncs.js"></script>
	<script language="javascript" type="text/javascript">   
        var LODOP; //声明为全局变量 
		function prn1_preview() {
			CreateOneFormPage();	
				LODOP.PREVIEW();
		};
		function prn1_print() {		
			CreateOneFormPage();
			LODOP.PRINT();	
		};
		function prn1_printA() {		
			CreateOneFormPage();
			LODOP.PRINTA(); 	
		};
		function CreateOneFormPage(){
			LODOP=getLodop(); 
			if (LODOP.VERSION) {
				LODOP.PRINT_INIT("一号物流小票打印");
				LODOP.SET_PRINT_STYLE("FontSize",18);
				LODOP.SET_PRINT_STYLE("Bold",1);
				LODOP.SET_PRINT_PAGESIZE(3,580,45,"");
				// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
				LODOP.ADD_PRINT_HTM(0,0,220,441,document.getElementById("print").innerHTML);
			}else{
				$('.print_download').show();
			}
		};	                     
	</script>
	</body>
</html>
